﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Veteran_cms.Models.HomeAdminListViewModel>" %>
<%@ Import Namespace="THS.HtmlHelpers" %>

    <div class="widget">
    <div class="title">
        <span class="titleIcon"><input type="checkbox" id="titleCheck" name="titleCheck" /></span><h6>Danh sách Chuyên mục</h6>
        <div style="float:right"><a href="<%=Url.Action("Create","ManageCategory") %>" title="" class="button greyishB" style="margin: 5px;"><img src="../../images/adminSite/icons/light/create.png" alt="" class="icon" /><span>THÊM MỚI</span></a></div>
    </div>
    <table cellpadding="0" cellspacing="0" width="100%" class="sTable withCheck mTable" id="checkAll">
        <thead>
            <tr>
                <td><img src="../../images/adminSite/icons/tableArrows.png" alt="" /></td>
               
                <td style="width:25%" class="sortCol"><div> Chuyên mục<span></span></div></td>
                <td style="width:50%" class="sortCol"> <div>Diễn giải <span></span></div></td>
                  <td style="width:10%" class="sortCol"><div>Hoạt động<span></span></div></td>
                <td>Chức năng</td>
            </tr>
        </thead>
        <tfoot>
            <tr>
                <td colspan="6">
                   
                         <div class="tPagination">
					        <%if (Model != null)
                                 { %>	       
                                            <%=Ajax.Pager(Model.CategoryInfo.CurrentPage, Model.CategoryInfo.TotalItems, "CategoryList", 0, Model.CategoryInfo.ItemsPerPage, "Paging")%>
                              <%} %>
					     </div>	
                    
                </td>
            </tr>
        </tfoot>
        <tbody>
        <%if (Model.CategoryList != null)
          {
              foreach (var item in Model.CategoryList)
              {%>
            <tr>
                <td><input type="checkbox" id="titleCheck2" name="checkRow" /></td>
                <td><a href="<%=Url.Action("Details", "ManageCategory", new {id = item.category_id}) %>" title=""><%=item.name%></a></td>
               <td>  <i><%=item.slug%></i></td>
                    <td>  <i><%=Html.CheckBox("is_active", item.visible)%></i></td>
                <td class="actBtns">
                    <a href="<%=Url.Action("Details", "ManageCategory", new {id = item.category_id}) %>" title="Cập nhật" class="tipS"><img src="../../images/adminSite/icons/dark/pencil.png" alt="" /></a>
                    <a href="<%=Url.Action("Delete", "ManageCategory", new {id = item.category_id}) %>" title="Xóa" class="tipS"><img src="../../images/adminSite/icons/uploader/deleteFile.png" alt="" onclick="return ConfirmDelete()" /></a>
                </td>
            </tr>
            <%}
          }%>
            
          
        </tbody>
    </table>
</div>